
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>首页</title>
</head>
<body>
<%--判断是否登录了?--%>
<%
//获取session 判断session中有没有用户名
    Object username = session.getAttribute("username");
    System.out.println(username);
   if(username!=null){    //有  展示新增和 查看
       out.write("<a href=\"addStudent.jsp\">新增学生</a>");
       out.write("<a href=\"/studentsystem/findAll\">查看学生</a>");
   } else {// //没有 展示 请登录
       out.write("<a href=\"/studentsystem/login.jsp\">请登录</a>");
   }
%>
</body>
</html>